package com.zjmzxfzhl.modules.purchase.service.bo;


import com.zjmzxfzhl.modules.purchase.controller.dto.PurchaseOrderDetailUpdateDto;
import com.zjmzxfzhl.modules.purchase.controller.vo.PurchaseOrderDetailVo;
import com.zjmzxfzhl.modules.purchase.entity.PurchaseIndent;
import com.zjmzxfzhl.modules.purchase.entity.PurchaseMaterial;
import com.zjmzxfzhl.modules.purchase.entity.PurchaseProject;
import com.zjmzxfzhl.modules.purchase.entity.PurchaseSupplier;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;

/**
 * @Author timyag
 * @Date 2020/6/28 10:21
 * @Version 1.0
 */
@Getter
@Setter
public class PurchaseOrderExcelBo {
    private Integer xh;
    private String equipmentCode;
    private String equipmentName;
    private String specification;
    private String unit;
    private BigDecimal equipmentNum;
    private BigDecimal equipmentUnitPrice;
    private BigDecimal equipmentTotalPirce;
    private String orderUsage;
    private String indentCode;
    private String supplier;
    private String comment;

    public PurchaseOrderExcelBo() {

    }

    public PurchaseOrderExcelBo(int xh, PurchaseOrderDetailVo detailVo) {
        this.setXh(xh);
        this.setEquipmentCode(detailVo.getMaterialCode());
        this.setEquipmentName(detailVo.getMaterialName());
        this.setSpecification(detailVo.getMaterialSpecification());
        this.setUnit(detailVo.getUnit());
        this.setEquipmentNum(detailVo.getMaterialNum());
        this.setEquipmentUnitPrice(detailVo.getUnitPrice());
        this.setEquipmentTotalPirce(detailVo.getMaterialTotalPrice());
        this.setOrderUsage(detailVo.getProjectName());
        this.setIndentCode(detailVo.getIndentCode());
        this.setSupplier(detailVo.getSupplierName());
        this.setComment(detailVo.getComment());
    }

    public PurchaseOrderExcelBo(PurchaseOrderDetailUpdateDto detailUpdateDto) {
        this.setXh(detailUpdateDto.getXh());
        this.setEquipmentCode(detailUpdateDto.getMaterialCode());
        this.setEquipmentName(detailUpdateDto.getMaterialName());
        this.setSpecification(detailUpdateDto.getMaterialSpecification());
        this.setUnit(detailUpdateDto.getUnit());
        this.setEquipmentNum(detailUpdateDto.getMaterialNum());
        this.setEquipmentUnitPrice(detailUpdateDto.getUnitPrice());
        this.setEquipmentTotalPirce(detailUpdateDto.getMaterialTotalPrice());
        this.setOrderUsage(detailUpdateDto.getProjectName());
        this.setIndentCode(detailUpdateDto.getIndentCode());
        this.setSupplier(detailUpdateDto.getSupplierName());
    }


}

